import React, { useContext, useRef } from 'react'
import { TabContext } from "@/components/TabHeader"
import "./Card.scss"


export default function Card({ image, content, i }) {
    const data = useContext(TabContext)
    return <div className="card">
        <img src={image} alt="" />
        <div className="content">
            {content.map((item, index) => {
                const [key, value] = item.split("：")
                return <div key={index}><b>{key}</b>：{key === "型号" ? data.domain[i] : value}</div>
            })}
        </div>
    </div>
}